const routes = [
  {
    path: '/',
    name: 'index',
    component: () => import('../views/index'),
    redirect: '/home',
    children: [
      {
        path: 'myinfo',
        component: () => import('../views/home/myinfo.vue'),
        children: [
          { path: 'edit', component: () => import('../components/myinfo/edit.vue') },
          { path: 'info', component: () => import('../components/myinfo/info.vue') },
          { path: 'change', component: () => import('../components/myinfo/change.vue') },
          { path: 'publish', component: () => import('../components/myinfo/publish.vue') },
          { path: 'complaint', component: () => import('../components/myinfo/complaint.vue') },
        ],
        redirect: 'myinfo/info',
      },
      { path: 'released', component: () => import('../views/home/released.vue') },
      { path: 'home', component: () => import('../views/home/home') },
      { path: 'accepted', component: () => import('../views/home/accepted.vue') }
    ],
  },
  {
    path: '/login',
    name: 'login',
    component: () => import('../views/login')
  },
  {
    path: '/register',
    name: 'register',
    component: () => import('../views/register')
  }
]

export default routes